<?php
/*
 * Author:YangBo Created on 2009-1-22:����08:43:12
 * 
 * TODO:TODO
 * as9
 * util/FileSystemUtil
 * 
 */
 class FileSystemUtil
 {
 	private static $baseURL;
 	public function FileSystemUtil()
 	{
 		$this->baseURL = "../../../../as9/util/";
 	}
 	/**
 	 * 创建目录
	 * @param $dirname ./dirname
	 * @return:bool
	*/
 	public static function createDir($dirname)
 	{
 		$dirname = $dirname;
 		return mkdir($dirname,0777);
//		if(!file_exists($dirname))
//		{
//			self::createDir(dirname($dirname));
//			mkdir($dirname,0777);
//		}
 	}
 	/**
 	 * 寻找目录
	 * @param $dirname ./dirname
	 * @return:bool
	*/
 	public static function findDir($dirname)
 	{
 		return is_dir($dirname);
 	}
 	/**
 	 * 删除目录
	 * @param $dirname ./dirname
	 * @return:bool
	*/
 	public static function deleteDir($dirname)
 	{
 		return rmdir($dirname);
 	}
 	/**
 	 * 删除文件
	 * @param $filename filename
	 * @return:bool
	*/
 	public static function deleteFile($filename)
 	{
 		return unlink($filename);
 	}
 	/**
 	 * 寻找文件
	 * @param $filename filename
	 * @return:bool
	*/
 	public static function findFile($filename)
 	{
 		return file_exists($filename);
 	}
 }
?>
